home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
001-100
/
001-025
/
004
/
bgrep
/
bgrep.man
< prev
next >
Wrap
Text File
|
1995-03-17
|
4KB
|
133 lines
BBBBGGGGRRRREEEEPPPP((((1111)))) UUUUNNNNIIIIXXXX 5555....0000 ((((GGGGeeeeoooorrrrggggiiiiaaaa TTTTeeeecccchhhh)))) BBBBGGGGRRRREEEEPPPP((((1111))))
NNNNAAAAMMMMEEEE
bgrep - search a file for one or more simple strings
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
bbbbggggrrrreeeepppp [ options ] string-list [ files ]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_B_g_r_e_p (Boyer-Moore grep) is program patterned after
_f_g_r_e_p(1). It uses the Boyer-Moore string searching
algorithm, which actually gets faster as the length of the
pattern to be searched for increases. _B_g_r_e_p searches for
plain _s_t_r_i_n_g_s (separated by newlines in the _s_t_r_i_n_g-_l_i_s_t
argument), not regular expressions in the style of _g_r_e_p.
The following _o_p_t_i_o_n_s are recognized:
----vvvv All lines but those matching are printed.
----xxxx (Exact) only lines matched in their entirety are
printed.
----cccc Only a count of the matching lines are printed. This
is the total count, across all the input files.
----iiii or ----yyyy
Ignore case when trying to match a line. Both versions
of this option are accepted for compatibility with _g_r_e_p
on different versions of Unix.
----llll Only the names of files with matching lines are printed
(once), separated by newlines.
----nnnn Each line is preceded by its relative line number
within the file.
----ssss Silent mode: No output is generated (except error
messages). This is useful for just checking the exit
status.
----eeee _s_t_r_i_n_g
Same as a simple _s_t_r_i_n_g argument, but useful when the
string begins with a -.
----ffff _f_i_l_e
The strings to be searched for are read from _f_i_l_e.
The arguments to the ----eeee and ----ffff options _m_u_s_t be given as
separate program arguments, i.e. separated by white space.
_B_g_r_e_p catches conflicting arguments (e.g. ----vvvv and ----xxxx) and
complains.
Page 1 (printed 1/1/86)
BBBBGGGGRRRREEEEPPPP((((1111)))) UUUUNNNNIIIIXXXX 5555....0000 ((((GGGGeeeeoooorrrrggggiiiiaaaa TTTTeeeecccchhhh)))) BBBBGGGGRRRREEEEPPPP((((1111))))
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_e_d(1), _s_e_d(1), _g_r_e_p(1), _s_h(1)
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Exit status 0 if any matches were found, 1 if none, 2 for
syntax errors on the command, or if any files could not be
opened (even if matches were found).
BBBBUUUUGGGGSSSS
Input lines and the strings to be searched for are limited
to 256 characters. Longer input lines are truncated.
_B_g_r_e_p will not search for any more than 120 different
strings.
Uses the <stdio.h> package, which slows it down some.
Nonetheless, in the usual case, it is 10% to 20% faster than
_f_g_r_e_p(1).
AAAAUUUUTTTTHHHHOOOORRRRSSSS
Roy Mongiovi (gatech!gitpyr!roy) coded the guts of the
Boyer-Moore algorithm, while Arnold Robbins (gatech!arnold)
wrote the code to do all the rest of the work, and the man
page.
Page 2 (printed 1/1/86)